package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.smartfactory.sail.entity.enums.WasteStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 废品库
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Waste对象", description = "废品库")
public class Waste implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "废品code")
    private String code;

    @ApiModelProperty(value = "原料id")
    @TableField("itemId")
    private Long itemId;

    @ApiModelProperty(value = "原料名称")
    @TableField("itemName")
    private String itemName;

    @ApiModelProperty(value = "规格型号")
    private String specification;

    @ApiModelProperty(value = "工序名称")
    @TableField("workName")
    private String workName;

    @ApiModelProperty(value = "生产工序id")
    @TableField("workId")
    private Long workId;

    @TableField("deviceId")
    private Long deviceId;

    @TableField("deviceName")
    private String deviceName;

    @TableField("userId")
    private Long userId;

    @TableField("userName")
    private String userName;

    @TableField("orderId")
    private Long orderId;

    @TableField("custId")
    private Long custId;

    @TableField("custName")
    private String custName;

    private String imags;

    @ApiModelProperty(value = "废品数量")
    private Integer size;

    @ApiModelProperty(value = "计量单位1个2克3千克参考StorageUnit枚举")
    private Integer unit;

    @ApiModelProperty(value = "处理方式1变卖2回原料库")
    @TableField("processType")
    private Integer processType;

    @ApiModelProperty(value = "处理数量")
    @TableField("processSize")
    private Integer processSize;

    @ApiModelProperty(value = "变卖价格")
    private BigDecimal price;

    @ApiModelProperty(value = "状态1未处理2处理完成")
    private WasteStatusEnum status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建人")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updateUser")
    private String updateUser;

    @ApiModelProperty(value = "更新时间yyyy-MM-dd HH:mm:ss")
    @TableField("updateTime")
    private LocalDateTime updateTime;


}
